package cn.edu.neusoft.amicooldemo.utils;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;

public interface FileUploadService {
	// 上传单个文件
    @Multipart
    @POST("api.php/create/mod/video")
    Call<ResponseBody>uploadFile(
            @Part("name") RequestBody name,
            @Part("videopath") RequestBody videopath,
            @Part("description") RequestBody description,
            @Part MultipartBody.Part thumb);

    // 上传多个文件
    @Multipart
    @POST("upload")
    Call<ResponseBody> uploadMultipleFiles(
            @Part("description") RequestBody description,
            @Part MultipartBody.Part file1,
            @Part MultipartBody.Part file2);
}
